#include "my_utility.h"

void splitstring(string str, string separator, string &first, string &second)
{
	size_t i = str.find(separator); //find seperator
	if(i != string::npos)
	{
		size_t y = 0;
		if(!str.empty())
		{
			first=""; second="";
			while(y != i)
			{
				first += str[y++]; //creating first string
			}
			y += separator.length(); //jumping forward separator length
			while(y != str.length())
			{
				second += str[y++]; //creating second string
			}
			
		}
	}
	else
	{
		first = str;
		second = ""; //if seperator is not there then second string == empty string
	}
}
